package com.fpt.quanlysanbong.dao;

import java.sql.Connection;
import java.sql.PreparedStatement;
import java.sql.ResultSet;
import java.sql.SQLException;
import java.sql.Statement;

import com.fpt.quanlyhethongsan.utils.JDBCClose;
import com.fpt.quanlyhethongsan.utils.JDBCConnector;

public class BaseDao {
	Connection conn = null;
	Statement stmt = null;
	ResultSet rs = null;
	PreparedStatement prst;

	public BaseDao() {
		conn = JDBCConnector.getConnection();
		try {
			stmt = conn.createStatement();
		} catch (SQLException e) {
			e.printStackTrace();
		}
	}

	public void closeConnection() {
		JDBCClose.close(conn, stmt, rs, prst);
	}
}
